zGlobal = {};
zUtil = {};
zCode = {};
zMsg = {};
zApi = {};
zConst = {};
zMenu = {};
zCheck = {};
zDictSys = {};
zDictAutocode = {};
zDictDesign = {};

zConst['alldict'] ="alldict";
zConst['busCode'] ="busCode";
zConst['busMsg'] ="busMsg";
zConst['reqData'] ="reqData";
zConst['resData'] ="resData";
zConst['data'] = "data";
zConst['count'] ="count";
zConst['page'] ="page";
zConst['rows'] ="limit";

function getTonken(){
    var headerVO = {};
    try{
        var httpStr = $.sessionStorage('http');
        if(httpStr){
            zGlobal['http'] = httpStr;
        }
        else if($('#httpStr').length>0){
            httpStr = $('#httpStr').attr('href');
            if(httpStr && httpStr.length>0){
                $.sessionStorage('http', httpStr);
                zGlobal['http'] = httpStr;
            }
        }
        var chref = window.location.href;
        var token = $.sessionStorage('myToken');
        if(!token || token.length<1){
           $.sessionStorage('myToken',"errortoken");
           if(chref.indexOf('/login') == -1){
               window.top.location.replace(zGlobal['http2'] + "/page/login.html");
           }
           return;
        }else{
           headerVO['myToken'] = token;
        }
    }catch(b){
    }
    return headerVO;
}
getTonken();//触发一次

zCode['GLOBAL_SUCCESS'] ="GLOBAL_SUCCESS";
zMsg['GLOBAL_SUCCESS'] ="成功";


zMenu['menu']  = [{
    text: '代码生成',
    iconCls: 'fa fa-cog  fa-1',
    state : 'open',
    children: [{
        text: '项目信息',
        menuId: 'ZL_PROJECT',
        href: './autocode/project/projectIndex.html',
        title: '项目信息',
    }, {
        text: '模板信息',
        menuId: 'ZL_TEMPLATE',
        href: './autocode/template/templateIndex.html',
        title: '模板信息',
    }, {
        text: '代码生成配置',
        menuId: 'ZL_CONFIGGENERATE',
        href: './autocode/cfgGenerate/cfgGenerateIndex.html',
        title: '代码生成配置',
    }, {
        text: '校验规则',
        menuId: 'ZL_VALIDATION',
        href: './autocode/validation/validationIndex.html',
        title: '校验规则',
    }, {
        text : '前端组件',
        menuId : 'ZL_WEBCOMPONENT',
        href:'./autocode/webComponent/webComponentIndex.html',
        title : '前端组件',
    }, {
        text: '字典',
        menuId: 'ZL_DICT',
        href: './autocode/dict/dictIndex.html',
        title: '字典',
    }, {
        text: '字段映射',
        menuId: 'ZL_FIELDMAPPING',
        href: './autocode/fieldMapping/fieldMappingIndex.html',
        title: '字段映射',
    }, {
        text: '数据库关键字',
        menuId: 'ZL_KEYWORD',
        href: './autocode/keyword/keywordIndex.html',
        title: '数据库关键字',
    }, {
        text: '数据库表',
        menuId: 'ZL_TABLE',
        href: './autocode/table/tableIndex.html',
        title: '数据库表',
    }, {
        text: '数据库序号(暂无用)',
        menuId: 'ZL_TABLESEQUENCE',
        href: './autocode/tableSequence/tableSequenceIndex.html',
        title: '数据库序号',
    }, {
        text: '实体对象(暂无用)',
        menuId: 'ZL_ENTITY',
        href: './autocode/entity/entityIndex.html',
        title: '实体对象',
    },{
        text : '在线SQL编写',
        menuId : 'ZL_ONLINESQL',
        href:'./online/onlineSql.html',
        title : '在线SQL编写',
    },]
}
/*,{
    text: '在线工具',
    iconCls: 'fa fa-cog  fa-1',
    children: [{
        text : '数据库配置',
        menuId : 'ZL_ONLINE_DATABASE',
        href:'./online/databaseInfo/databaseInfoIndex.html',
        title : '数据库配置',
    },{
        text : '数据库查询',
        menuId : 'ZL_ONLINE_DATABASESQUERY',
        href:'./online/databaseInfo/databaseQueryIndex.html',
        title : '数据库查询',
    },{
        text : 'JSON工具',
        menuId : 'ZL_ONLINE_JSONLOOK',
        href:'./online/jsonView/jsonlook.html',
        title : 'JSON工具',
    }]
}*/

/*,{
    text: '可视化设计',
    iconCls: 'fa fa-cog  fa-1',
    children: [{
        text : '在线页面',
        menuId : 'ZL_HTMLDESIGN',
        href:'./visualEdit/htmlDesign/htmlDesignIndex.html',
        title : '在线页面',
    }]
}*/
];